package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;

import java.util.List;

public interface DishFlavorMapper {
    /**
     * 新增菜品口味
     * @param flavors
     */
    void insertBatch(List<DishFlavor> flavors);

    /**
     * 批量删除菜品下的口味
     * @param ids
     */
    void deleteBatch(List<Long> ids);

    /**
     * 根据dish id查询口味
     * @param id
     * @return
     */
    List<DishFlavor> getByDishId(Long id);

    /**
     * 根据菜品id 删除口味
     * @param id
     */
    @Delete("delete from dish_flavor where dish_id = #{id}")
    void deleteByDishId(Long id);
}
